package com.ifonly.ar.sql;

import com.ifonly.ar.core.Record;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

/**
 * @author ifonly
 * @version 1.0 2015-12-07 10:03
 * @since JDK 1.6
 */
public class RecordResultSetHandler {

    public static Record handle(ResultSet rs) throws SQLException {
        Record record = new Record();
        Map<String, Object> columnAndValues = MapResultSetHandler.handle(rs);
        record.setColumnAndValues(columnAndValues);
        return record;
    }

}
